package com.gxgeek.product.exception;

import com.gxgeek.product.enums.ResultEnum;
import lombok.Getter;

/**
 * Created by gx on 2017/7/12.
 */
@Getter
public class SellException extends RuntimeException{
    private Integer code;


    public SellException(ResultEnum resultEnum){
        super(resultEnum.getMessage());
        this.code=resultEnum.getCode();
    }
    public SellException(ResultEnum resultEnum,String messsage){
        super(messsage);
        this.code=resultEnum.getCode();
    }


    public SellException(Integer code, String defaultMessage) {
        super(defaultMessage);
        this.code=code;
    }
}
